<?php
class Default_Model_DbTable_CountryState extends Custom_Db_Table_Abstract
{
    public $_name = 'viz_country_state';
    public $_primary = 'state_id'; 
    
    public function getStateByCountryId($countryid) 
    {
        $this->_orderType = 'ASC';
        $select = $this->select()
                       ->from($this->_name)
                        ->where("country_id='$countryid'")
                        ->order($this->getOrderBy(array('name')));    
          $res = $this->fetchAll($select)->toArray();      
        return $res;
                
    }
}
?>
